<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta name="author" content="blog.anchen8.net" />

    <title>无标题 4</title>
</head>
<link rel="stylesheet" href="__CSS__/pintuer.css"/>
<link rel="stylesheet" href="__CSS__/admin.css"/>
<script src="__JS__/jquery.js"></script>
<script src="__JS__/pintuer.js"></script>
<script src="__JS__/ajaxfileupload.js"></script>
<script src="__JS__/layer/layer.js"></script>
<body>
<form method="post" action="{:url('Mailbox/mailbox_see')}?mailbox_id={$mailbox_id}" id="listform">
    <div class="panel admin-panel">
        <div class="panel-head"><strong class="icon-reorder">客房详情列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
        <div class="padding border-bottom">
            <ul class="search" style="padding-left:10px;">
                <!--<li> <a class="button border-main icon-plus-square-o" href="__MODULE__/Add/add"> 添加内容</a> </li>-->
                <li>搜索：</li>
                <li>
                    <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
                    <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
            </ul>
        </div>
        <table class="table table-hover text-center">
            <tr>
                <th width="100" style="text-align:left; padding-left:20px;">ID</th>
                <th width="10%">客房名字</th>
                <th width="10%">发布酒店</th>
                <th width="10%">客房图片</th>
                <th width="10%">酒店电话</th>
                <th width="10%">酒店邮箱</th>
                <th width="10%">客房简介</th>
                <th width="10%">客房价格</th>
                <th width="100">酒店地址</th>
                <th width="370">操作</th>
            </tr>
            {volist name="date" id="v"}
            <tr>
                <td style="text-align:left; padding-left:20px;"><input type="checkbox" name="" value="" />{$v.id}</td>
                <td width="10%">{$v.r_name}</td>
                <td>{$v.name}</td>
                <td><a href="__UPLOADS__{$v.r_img}" style="width:100px;height: 100px;"><img src="__UPLOADS__/{$cc[$key]['r_img'][0]}" alt="客房图片" style="width: 100px;height: 50px;border-radius: 5px;"></a></td>
                <td>{$v.phone}</td>
                <td>{$v.Mail}</td>
                <td>{$v.r_introduce}</td>
                <td>{$v.amounts}</td>
                <td>{$v.detailed}</td>
                <td>
                    <div class="button-group">
                        <a class="button border-main" href="{:url('Mailbox/modify')}?mailbox_id={$mailbox_id}"><span class="icon-edit"></span> 修改</a>
                        <a class="button border-red" href="{:url('Mailbox/delete')}?mailbox_id={$mailbox_id}" onclick="return del(1,1,1)">
                            <span class="icon-trash-o"></span> 删除</a>
                    </div>
                </td>
            </tr>
            {/volist}
            <tr></tr>
            <tr>
                <td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox" id="checkall"/>
                    全选 </td>
                <td colspan="7" style="text-align:left;padding-left:20px;">
                    <button class="button border-red icon-trash-o" style="padding:5px 15px;" onclick="DelSelect()">删除</button>

                </td>
                <td></td>
                <td></td>
                <td></td>

            </tr>
            <tr>
                <td></td>
                <td colspan="8"><div class="pagelist"></div></td>
                <td></td><td></td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>
<script type="text/javascript">

    //搜索
    function changesearch(){

    }

    //单个删除
    function del(id,mid,iscid){
        if(confirm("您确定要删除吗?删除后您商家所有资料都会被删除哦！！")){

        }
    }

    //全选
    $("#checkall").click(function(){
        $("input").each(function(){
            if (this.checked) {
                this.checked = false;
            }
            else {
                this.checked = true;
            }
        });
    })

    //批量删除
    function DelSelect(){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){
            var t=confirm("您确认要删除选中的内容吗？");
            if (t==false) return false;
            $("#listform").submit();
        }
        else{
            alert("请选择您要删除的内容!");
            return false;
        }
    }

    //批量排序
    function sorts(){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");
            return false;
        }
    }


    //批量首页显示
    function changeishome(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量推荐
    function changeisvouch(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){


            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量置顶
    function changeistop(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }


    //批量移动
    function changecate(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量复制
    function changecopy(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){
            var i = 0;
            $("input[name='id[]']").each(function(){
                if (this.checked==true) {
                    i++;
                }
            });
            if(i>1){
                alert("只能选择一条信息!");
                $(o).find("option:first").prop("selected","selected");
            }else{

                $("#listform").submit();
            }
        }
        else{
            alert("请选择要复制的内容!");
            $(o).find("option:first").prop("selected","selected");
            return false;
        }
    }

</script>